package com.inspur.dgov.bsp.application.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 应用资源信息
 *
 * @author chiyupei
 * @version 1.0
 * @since 1.0
 */
@Data
@TableName("pub_resource")
@ApiModel(value="PubResource对象", description="应用资源信息")
public class PubResource implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "资源ID")
    @TableId("ID")
    private Long id;

    @ApiModelProperty(value = "资源编码")
    @TableField("CODE")
    private String code;

    @ApiModelProperty(value = "资源名称")
    @TableField("NAME")
    private String name;

    @ApiModelProperty(value = "资源别名")
    @TableField("ALIAS")
    private String alias;

    @ApiModelProperty(value = "资源图标")
    @TableField("ICON")
    private String icon;

    @ApiModelProperty(value = "资源类型(1:菜单 2:按钮)")
    @TableField("CATEGORY")
    private String category;

    @ApiModelProperty(value = "路由地址")
    @TableField("PATH")
    private String path;

    @ApiModelProperty(value = "上级资源ID")
    @TableField("PARENT_ID")
    private Long parentId;

    @ApiModelProperty(value = "操作按钮类型")
    @TableField("ACTION")
    private String action;

    @ApiModelProperty(value = "打开方式(0:当前窗口 1:新窗口)")
    @TableField("OPEN_TYPE")
    private String openType;

    @ApiModelProperty(value = "应用ID")
    @TableField("APP_ID")
    private Long appId;

    @ApiModelProperty(value = "排序")
    @TableField("SORT_ORDER")
    private Integer sortOrder;

    @ApiModelProperty(value = "状态(1:有效 0:无效)")
    @TableField("STATUS")
    private String status;

    @ApiModelProperty(value = "资源说明")
    @TableField("REMARK")
    private String remark;

    @ApiModelProperty(value = "创建者ID")
    @TableField("CREATOR")
    private Long creator;

    @ApiModelProperty(value = "创建时间")
    @TableField("CREATE_TIME")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新者ID")
    @TableField("UPDATOR")
    private Long updator;

    @ApiModelProperty(value = "更新时间")
    @TableField("UPDATE_TIME")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;


}
